package com.yingxin.yxerp.module.dingtalk.entity.enums;

/**
 * 企业微信 - 人事助手 - 员工试用期
 */

public enum WeComProbationPeriod {

    ZERO(1,"无"),
    ONE(2,"1个月"),
    TWO(3,"2个月"),
    THREE(4,"3个月"),
    FOUR(5,"4个月"),
    FIVE(6,"5个月"),
    SIX(7,"6个月"),
    ;

    private Integer probationPeriod;

    private String probationPeriodName;

    WeComProbationPeriod(Integer probationPeriod, String probationPeriodName) {
        this.probationPeriod = probationPeriod;
        this.probationPeriodName = probationPeriodName;
    }

    public Integer getProbationPeriod() {
        return probationPeriod;
    }

    public void setProbationPeriod(Integer probationPeriod) {
        this.probationPeriod = probationPeriod;
    }

    public String getProbationPeriodName() {
        return probationPeriodName;
    }

    public void setProbationPeriodName(String probationPeriodName) {
        this.probationPeriodName = probationPeriodName;
    }

    public static WeComProbationPeriod getEnum(Integer probationPeriod) {
        if( probationPeriod == null ){
            return null;
        }
        for (WeComProbationPeriod i : WeComProbationPeriod.values()) {
            if ( i.getProbationPeriod() == probationPeriod ) {
                return i;
            }
        }
        return null;
    }

}
